package com.lookoutthebush.companyindex.controller;

import com.lookoutthebush.companyindex.domain.NewsDO;
import com.lookoutthebush.companyindex.services.INewsService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("news")
public class NewsController {
    @Resource
    private INewsService newsService;

    @GetMapping("createNews")
    public Long createNews() {
        NewsDO newsDO = new NewsDO();
        return newsService.createNews(newsDO);
    }
}
